package com.yubest.demo.service.impl;

import com.yubest.demo.dto.UserReqDTO;
import com.yubest.demo.dto.UserRespDTO;
import com.yubest.demo.service.UserService;
import org.springframework.stereotype.Service;

/**
 * @Author hweiyu
 * @Description
 * @Date 2022/1/21 10:11
 */
@Service(value = "userService")
public class UserServiceImpl implements UserService {

    /**
     * 模拟更新用户信息
     * @param reqDTO
     * @return
     */
    @Override
    public boolean update(UserReqDTO reqDTO) {
        //do update
        return true;
    }

    /**
     * 模拟获取用户信息
     * @param id
     * @return
     */
    @Override
    public UserRespDTO get(Long id) {
        return new UserRespDTO()
                .setId(id)
                .setUserName("李四");
    }
}
